package com.ticket.sass.provider.dto.admin;

import com.google.gson.Gson;
import com.ticket.sass.provider.service.LabModel;
import com.ticket.sass.provider.util.GsonUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.List;

/**
 * @author ywb
 * @date 2024-03-18 15:34
 */
@Data
@AllArgsConstructor
@ApiModel(value = "管理员详细信息")
public class AdminInfoOutput {
    @ApiModelProperty(value = "id")
    private Long id;
    
    @ApiModelProperty(value = "用户名")
    private String username;
    
    @ApiModelProperty(value = "头像")
    private String avatar = "https://cdn.eleadmin.com/20200610/avatar.jpg";
    
    @ApiModelProperty(value = "启用状态")
    private Boolean enable;
    
    @ApiModelProperty(value = "租户ID")
    private Long tenantId;
    
    @ApiModelProperty(value = "影院ID")
    private List<LabModel> cinemas;
    
    public AdminInfoOutput() {
    }
    
    public AdminInfoOutput(Long id, String username, Boolean enable, Long tenantId, List<LabModel> cinemas) {
        this.id = id;
        this.username = username;
        this.enable = enable;
        this.tenantId = tenantId;
        this.cinemas = cinemas;
    }
    

    
    public String toJson() {
        Gson instance = GsonUtil.getInstance();
        return instance.toJson(this);
    }
}
